package com.qf.day06;

import java.util.Random;
import java.util.Scanner;

public class Play extends Warrior {

    public void play1() {
        Hero warrior = new Warrior("战士",100,1,50,0);
        System.out.println(warrior);
//        System.out.println(warrior.random(warrior.getStrength()));
        //随机数
//        System.out.println(warrior.random(warrior.getStrength()));

        while (true){
            System.out.println("输入1普通攻击\t输入2释放技能\t输入3不玩了");
            Scanner sc = new Scanner(System.in);
            int i = sc.nextInt();
            switch (i){
                case 1:


                    warrior.NormalAttack(warrior.getStrength());
                    System.out.println(warrior);
                    break;
                case 2:
//                    System.out.println("释放技能");
                    super.Heroicblows(warrior.getStrength());
                    System.out.println(warrior);

                    break;

                case 3:
                    System.out.println("不玩了");
                    i=3;
                    break;

                default:
                    System.out.println("技能键按错了");
            }
            if (i==3){
                break;
            }
        }


    }
}
